<html>
<head>
    <meta charset="UTF-8">
    <title>考勤</title>
</head>
<body>
<script type="text/javascript" src="./$.js"></script>
<script>
    require(['!this.js'], $$.load)
</script>
</body>
</html>
<template data-name="this.htm">
    <div>
        <head_top :head="menu_top"></head_top>
        <div class="contaniner">
            <div class="sidebar">
                <menu_child :nav_data="menu_child"></menu_child>
            </div>
            <div class="main-content">
                <div class="main">
                    <div class="tab-wrap">
                        <div class="main_hd no-tab">
                            <h2>补签管理</h2>
                        </div>
                    </div>
                    <div class="cf table-bar">
                        <div class="fl">
                            <a class="btn btn_add btn_primary r btn_new" href="/sys/supply/add.html">
                                <i class="icon14_common add_white"></i> 新增
                            </a>
                        </div>
                    </div>
                    <div class="data-table" v-if="data">
                        <table cellspacing="1">
                            <thead>
                            <tr>
                                <th width="2%"></th>
                                <th style="width: 10%">申请人</th>
                                <th style="width: 12%">部门</th>
                                <th style="width: 25%">补签原因</th>
                                <th style="width: 15%">补签时间</th>
                                <th class="select-table" style="width: 8%">
                                    <selectGroup :type="source" :width="90" v-model="source"></selectGroup>
                                </th>
                                <th class="list-edit" style="width: 5%">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="list in data.list">
                                <th></th>
                                <td>{{list.name}}</td>
                                <td>{{list.dept}}</td>
                                <td class="select-table-td">{{list.reason}}</td>
                                <td>{{list.time}}</td>
                                <td class="select-table-td" v-if="list.source=='m'">前台</td>
                                <td class="select-table-td" v-else>后台</td>
                                <td class="list-edit">
                                    <a :href="'/sys/supply/detail.html?access='+list.id">详情</a>
                                </td>
                            </tr>
                            <tr v-if="data.list==''||data==''" class="empty_item">
                                <td class="empty_tips" colspan="100">暂无数据</td>
                            </tr>
                            </tbody>
                        </table>
                        <page :page_data="data.page"></page>
                    </div>
                </div>
            </div>
        </div>
        <foot></foot>
    </div>
</template>
<script data-name="this.js">
    require('../$res/js/common');
    module.exports = {
        template: require('!this.htm'),
        methods: {},
        components: {
            'foot': $$.foot,
            'page': require('../$res/component/page_tool'),
            'selectGroup': require('../$res/component/filter')
        },
        watch: {
            source: function () {
                $$.toast.show();
                $$.public.get_list($$.m.interFace, {source: $$.m.source});
            }
        },
        loaded: function () {
            $$.m = {
                data: false,
                source: '',
                interFace: '/sys/user/lists_bq'
            };
            $$.init_comps.head();
            $$.init_comps.menu();
            $$.toast.show();
            $$.public.get_list($$.m.interFace);
        }
    };
</script>
